<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>响应式demo</title>
    <style>
        body，h3 {
            margin: 0;
        }

        h3 {
            text-align: center;
            font-size: 30px;
        }

        /* @media screen and (min-width:1024px) { */

        header,
        .content,
        footer {
            width: 1000px;
            margin: 0 auto;
        }

        header,
        footer {
            height: 50px
        }

        header {
            background: yellowgreen;
        }

        .content {
            height: 500px;
            background: indianred;
            overflow: hidden;
        }

        /* .content div {} */

        .content:after {
            content: " ";
            overflow: hidden;
            clear: both;
        }

        .left {
            height: 500px;
            float: left;
            width: 150px;
            background: khaki
        }

        .certre {
            height: 500px;
            float: left;
            width: 700px;
            background: springgreen;
        }

        .right {
            height: 500px;
            float: left;
            width: 150px;
            background: thistle;
        }

        footer {
            background: green;
        }

        /* } */

        @media screen and (min-width:720px) and (max-width:960px) {

            header,
            .content,
            footer {
                width: 100%;
                margin: 0 auto;
            }

            header,
            footer {
                height: 50px;
            }

            .content {
                height: auto;
                overflow: hidden;
            }

            .left {
                width: 25%;
                float: left;
            }

            .certre {
                width: 75%;
                float: left;
            }

            .right {
                width: 100%;
                height: 100px;
                float: none;
                clear: both;
            }

        }

        @media screen and (min-width:320px) and (max-width:720px) {

            header,
            .content,
            footer {
                width: 100%;
                margin: 0 auto;
            }

            .left {
                width: 100%;
                height: 100px;
            }

            .certre {
                width: 100%;
                height: 300px;
            }

            .right {
                width: 100%;
                height: 100px;
                float: none;
                clear: both;
            }


        }
    </style>
</head>

<body>
    <h3>响应式web练习</h3>
    <header></header>
    <div class="content">
        <div class="left">
            left
        </div>
        <div class="certre">
            certre
        </div>
        <div class="right">
            right
        </div>
    </div>
    <footer>

    </footer>
</body>

</html>